//
//  UITextField+ClearBtn.m
//  YZMicroStock
//
//  Created by apple on 17/8/15.
//  Copyright © 2017年 cqjr. All rights reserved.
//

#import "UITextField+ClearBtn.h"

@implementation UITextField (ClearBtn)

- (void)awakeFromNib{
    [super awakeFromNib];
    [self configClearBtn];
}

- (instancetype)init{
    self = [super init];
    if (self) {
        [self configClearBtn];
    }
    return self;
}

- (void)configClearBtn{
    UIButton *clean = [self valueForKey:@"_clearButton"];
    UIImage *image =[UIImage imageNamed:@"cleanimage.png"];
    [clean.imageView setImage:image];
    [clean setImage:image forState:UIControlStateNormal];
    [clean setImage:image forState:UIControlStateHighlighted];
}



@end
